package snafu.implementation.states.literals.surround;

import snafu.framework.objects.WorldObject;
import snafu.framework.objects.WorldObjectItself;
import snafu.framework.states.literals.StateLiteralItself;
import snafu.framework.states.literals.StateLiteralView;
import snafu.framework.view.Access;

public class SurroundLiteralView extends StateLiteralView<WorldObject> implements SurroundLiteral {

	public SurroundLiteralView(Access access, StateLiteralItself<WorldObject> literal) {
		super(access, literal);
	}

	@Override
	public WorldObject getValue() {
		WorldObjectItself<?> object = (WorldObjectItself<?>) literal.getValue();
		return (WorldObject) object.createView(access);
	}
	
	@Override
	public int getRange() {
		return ((SurroundLiteral) literal).getRange();
	}

}
